<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" id="viewport" content="width=320, target-densitydpi=1, user-scalable=no">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta name="format-detection" content="telephone=no">
		<link rel="shortcut icon" href="images/favicon.ico">
		<script src="libs/jquery.min.js"></script>
		<title>宋宫汝瓷客服授权查询</title>
		<style>
			body,
			h1,
			h2,
			h3,
			h4,
			h5,
			h6,
			p,
			input {
				margin: 0;
				padding: 0;
				font-size: 13px;
				font-family: "微软雅黑";
			}
			
			ul,
			ol,
			dl,
			li,
			dt,
			dd {
				list-style-type: none;
				margin: 0;
				padding: 0;
				font-family: "微软雅黑"
			}
			
			a {
				text-decoration: none;
				color: #333333;
			}
			
			a:hover {
				text-decoration: none;
				color: #980600;
			}
			
			.clear {
				clear: both;
				overflow: hidden;
			}
			
			img {
				border: none;
			}
			
			body {
				background: #FFF;
			}
			
			.wrap {
				margin: 2%;
			}
			
			.logo {
				width: 20%;
				display: block;
				margin: 15% auto;
			}
			
			.xian {
				border-bottom: 1px solid #d91b05;
				width: 100%;
				display: block;
				margin: 20px auto;
				margin-bottom: 0;
			}
			
			.wx_name {
				display: block;
				width: 100%;
				display: block;
				margin: 4% auto;
				border: 1px solid #eee;
				border-radius: 2px;
				font-size: 13px;
				height: 35px;
				line-height: 35px;
			}
			
			.button {
				background-color: #d91b05;
				border: medium none;
				color: #fff;
				display: block;
				float: left;
				font-size: 16px;
				height: 40px;
				line-height: 35px;
				margin: 0 auto 30px;
				padding-right: 10px;
				text-align: center;
				width: 100%;
				border-radius:2px ;
				cursor:pointer;
			}
			
			@media (min-width: 640px) {
				.wrap {
					width: 640px;
					margin: 0 auto;
				}
				.logo {
					width: 30%;
				}
				.xian {
					border-bottom: 3px solid #d91b05;
				}
				.wx_name {
					height: 45px;
					line-height: 45px;
				}
				.zhengshu{
					width: 100%;
				}
			}
		</style>

		<body>
			<div class="wrap">
				<img class="logo" src="images/LOGO.png" />
				<p class="xian"></p>
				<form>
					<input id='weixin' class="wx_name" type="text" placeholder=" 请输入授权的微信号" name="weixin" />
					<input value="提交" name="" onclick="queryp()" class="button" >
				</form>

			</div>
			<div class="wrap">
				<p id="successMSG" class="xian"></p>
			</div>
			
<script type="text/javascript">
function queryp() {  
	var curWwwPath=window.document.location.href
	var basePath=curWwwPath.substring(0,curWwwPath.indexOf("/query"))
	var x=document.getElementById("successMSG");
	var weixin = $("#weixin").val();
	var para =weixin||"cc"
	localStorage.removeItem('name');
	localStorage.removeItem('code');
	localStorage.removeItem('weixin');
    $.ajax({  
        type: 'post',  
        url: basePath+'/sys/cust/weixin/'+para,  
        async: true,  
        jsonp: 'jsoncallback',  
        success: function (data) {  
            if(data.config){
            x.innerHTML="恭喜!授权信息查询成功";
        	localStorage.setItem('name',data.config.name)
         	localStorage.setItem('code',data.config.code)
         	localStorage.setItem('weixin',data.config.weixin)
            window.location.href=basePath+"/zhengshuc.html";
            }else{
            	 x.innerHTML="对不起，查无此授权号！";  
            }
        },  
        error: function () {  
       	 x.innerHTML="对不起，查无此编号！";  
       	 }  
    });  

}  
 

</script>

		</body>

</html>